#ifndef __STRING_MEMCMP_H__
#define __STRING_MEMCMP_H__

/**
 *  memcmp()
 *  porovna pametovy blok 1 s pametovym blokem 2 o <count> bytech
 */
int memcmp(const void *cs, const void *ct, unsigned count) {
  const char *su1;
  const char *su2;
  signed char res = 0;
  for( su1 = (char *)cs, su2 = (char *)ct; 0 < count; ++su1, ++su2, count-- )
    if ((res = *su1 - *su2) != 0)
      break;
  return res;
}

#endif
